<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="x">外边距折叠/重叠/塌陷</div>
    <div class="f">
        <div class="son">
        </div>
    </div>
    <br>
    <div class="brother">外边距折叠/重叠/塌陷</div>
    <div class="father">
        <div class="son1">
        </div>
    </div>
    
</body>
<style>
    .x{
        background-color: yellow;
        font-size: 3em;
    }
    .f{
        width: 200px;
        height: 150px;
        background-color: green;
        margin-top: 20px;
        overflow: hidden;
        border-top: 3px solid transparent;
    }
    .son{
        background-color: pink;
        width: 50px;
        height: 30px;
      margin: 20px;
    }
    .brother{
        background-color:pink;
        font-size: 2em;
        margin: 6px;
    }
    .father{
        width: 200px;
        height: 150px;
        background-color: red;
        margin-top: 20px;
        overflow: hidden;

    }
    .son1{
        background-color: black;
        width: 20px;
        height: 20px;
        margin-top: 30px;
    }

</style>
</html>